package com.bitbakery.plugin.cl.lang;

import com.bitbakery.plugin.cl.CLIcons;
import com.intellij.openapi.fileTypes.LanguageFileType;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

/**
 * Contains information about Common Lisp file types (*.cl and *.lisp)
 */
public class CLFileType extends LanguageFileType {
    public static final CLFileType COMMON_LISP = new CLFileType();

    private CLFileType() {
        super(new CLLanguage());
    }

    @NotNull
    @NonNls
    public String getName() {
        return "Common Lisp";
    }

    @NotNull
    public String getDescription() {
        return "Common Lisp source file";
    }

    @NotNull
    @NonNls
    public String getDefaultExtension() {
        return "lisp";
    }

    @Nullable
    public Icon getIcon() {
        return CLIcons.COMMON_LISP_ICON;
    }
}
